import Vue from 'vue'
import VeeValidate from 'vee-validate'
import { Validator } from 'vee-validate'

const dictionary = {
  cn: {
    messages:{
      required: () => '该字段必填',
      in: () => '请选择有效的选项',
      max: () => '数据长度不合法',
      min: () => '数据长度不合法',
      numeric: () => '该字段只能填写数字',
      date_format: () => '不是有效的日期',
      min_value: () => '范围不合法',
      max_value: () => '范围不合法'
    }
  }
};
Validator.localize(dictionary);

const config = {
    locale: 'cn'
}
Vue.use(VeeValidate,config);

export default VeeValidate
